Optimal. Leaf size=44 \[ \frac {2 \cot (x)}{a}-\frac {3 \tanh ^{-1}(\cos (x))}{2 a}+\frac {\cot (x) \csc ^2(x)}{a \csc (x)+a}-\frac {3 \cot (x) \csc (x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3818, 3787, 3767, 8, 3768, 3770} \[ \frac {2 \cot (x)}{a}-\frac {3 \tanh ^{-1}(\cos (x))}{2 a}+\frac {\cot (x) \csc ^2(x)}{a \csc (x)+a}-\frac {3 \cot (x) \csc (x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3768
Rule 3770
Rule 3787
Rule 3818
Rubi steps
\begin {align*} \int \frac {\csc ^4(x)}{a+a \csc (x)} \, dx &=\frac {\cot (x) \csc ^2(x)}{a+a \csc (x)}-\frac {\int \csc ^2(x) (2 a-3 a \csc (x)) \, dx}{a^2}\\ &=\frac {\cot (x) \csc ^2(x)}{a+a \csc (x)}-\frac {2 \int \csc ^2(x) \, dx}{a}+\frac {3 \int \csc ^3(x) \, dx}{a}\\ &=-\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc ^2(x)}{a+a \csc (x)}+\frac {3 \int \csc (x) \, dx}{2 a}+\frac {2 \operatorname {Subst}(\int 1 \, dx,x,\cot (x))}{a}\\ &=-\frac {3 \tanh ^{-1}(\cos (x))}{2 a}+\frac {2 \cot (x)}{a}-\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc ^2(x)}{a+a \csc (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.35, size = 83, normalized size = 1.89 \[ \frac {-4 \tan \left (\frac {x}{2}\right )+4 \cot \left (\frac {x}{2}\right )-\csc ^2\left (\frac {x}{2}\right )+\sec ^2\left (\frac {x}{2}\right )+12 \log \left (\sin \left (\frac {x}{2}\right )\right )-12 \log \left (\cos \left (\frac {x}{2}\right )\right )-\frac {16 \sin \left (\frac {x}{2}\right )}{\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )}}{8 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.47, size = 134, normalized size = 3.05 \[ \frac {8 \, \cos \relax (x)^{3} + 6 \, \cos \relax (x)^{2} - 3 \, {\left (\cos \relax (x)^{3} + \cos \relax (x)^{2} + {\left (\cos \relax (x)^{2} - 1\right )} \sin \relax (x) - \cos \relax (x) - 1\right )} \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) + 3 \, {\left (\cos \relax (x)^{3} + \cos \relax (x)^{2} + {\left (\cos \relax (x)^{2} - 1\right )} \sin \relax (x) - \cos \relax (x) - 1\right )} \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) - 2 \, {\left (4 \, \cos \relax (x)^{2} + \cos \relax (x) - 2\right )} \sin \relax (x) - 6 \, \cos \relax (x) - 4}{4 \, {\left (a \cos \relax (x)^{3} + a \cos \relax (x)^{2} - a \cos \relax (x) + {\left (a \cos \relax (x)^{2} - a\right )} \sin \relax (x) - a\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.37, size = 73, normalized size = 1.66 \[ \frac {3 \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{2 \, a} + \frac {a \tan \left (\frac {1}{2} \, x\right )^{2} - 4 \, a \tan \left (\frac {1}{2} \, x\right )}{8 \, a^{2}} + \frac {2}{a {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}} - \frac {18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 4 \, \tan \left (\frac {1}{2} \, x\right ) + 1}{8 \, a \tan \left (\frac {1}{2} \, x\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.27, size = 67, normalized size = 1.52 \[ \frac {\tan ^{2}\left (\frac {x}{2}\right )}{8 a}-\frac {\tan \left (\frac {x}{2}\right )}{2 a}-\frac {1}{8 a \tan \left (\frac {x}{2}\right )^{2}}+\frac {1}{2 a \tan \left (\frac {x}{2}\right )}+\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2 a}+\frac {2}{a \left (\tan \left (\frac {x}{2}\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.33, size = 97, normalized size = 2.20 \[ -\frac {\frac {4 \, \sin \relax (x)}{\cos \relax (x) + 1} - \frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}}{8 \, a} + \frac {\frac {3 \, \sin \relax (x)}{\cos \relax (x) + 1} + \frac {20 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - 1}{8 \, {\left (\frac {a \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + \frac {a \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}}\right )}} + \frac {3 \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right )}{2 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.26, size = 69, normalized size = 1.57 \[ \frac {10\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+\frac {3\,\mathrm {tan}\left (\frac {x}{2}\right )}{2}-\frac {1}{2}}{4\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+4\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}-\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{2\,a}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8\,a}+\frac {3\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{2\,a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\csc ^{4}{\relax (x )}}{\csc {\relax (x )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________